import 'package:enterprise_v6_app/app/core/core.dart';
import 'package:enterprise_v6_app/app/modules/application/standardization/pages/regulation/law/law_view.dart';
import 'package:enterprise_v6_app/app/modules/application/standardization/pages/regulation/rule/rule_view.dart';

class StandardizationRegulationView extends StatelessWidget {
  const StandardizationRegulationView({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(
        top: 12.w,
        left: 14.w,
        right: 14.w,
      ),
      color: AppColors.bg_color_grey,
      child: DefaultTabController(
        length: 2,
        initialIndex: 0,
        child: Column(
          children: [
            Container(
              decoration: BoxDecoration(
                color: Colors.white,
                borderRadius: BorderRadius.circular(8),
              ),
              height: 54.w,
              child: TabBar(
                enableFeedback: false,
                tabs: const [
                  Tab(text: '法规标准'),
                  Tab(text: '规章规程'),
                ],
                tabAlignment: TabAlignment.fill,
                dividerColor: Colors.transparent,
                labelPadding: EdgeInsets.only(bottom: 10.w, left: 13.w, right: 13.w),
                labelStyle: TextStyle(
                  fontSize: 16.sp,
                  fontWeight: FontWeight.w500,
                ),
                unselectedLabelStyle: TextStyle(
                  fontSize: 16.sp,
                  fontWeight: FontWeight.w500,
                ),
                labelColor: Colors.black,
                unselectedLabelColor: const Color(0xffA0A7B5),
                indicatorPadding: EdgeInsets.only(top: 36.w, bottom: 10.w),
                indicator: const BoxDecoration(
                  image: DecorationImage(
                    image: AssetImage(
                      AppImages.icon_app_work_plan,
                    ),
                  ),
                ),
              ),
            ),
            AppGaps.vGap10,
            Expanded(
              child: TabBarView(
                children: [
                  StandardizationRegulationLawView(),
                  StandardizationRegulationRuleView(),
                ],
              ),
            ),
          ],
        ),
      ),
    );
  }
}
